↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
WAYS_IN(Amount, .(s(C), Coins), N) → U41(Amount, C, Coins, N, =_in(Amount, s(X)))
WAYS_IN(Amount, .(s(C), Coins), N) → =_IN(Amount, s(X))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U91(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → PLUS_IN(Amount, s(X1), s(C))
PLUS_IN(s(X), Y, s(Z)) → U31(X, Y, Z, plus_in(X, Y, Z))
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
PLUS_IN(0, X, X) → U21(X, nat_in(X))
PLUS_IN(0, X, X) → NAT_IN(X)
NAT_IN(s(X)) → U11(X, nat_in(X))
NAT_IN(s(X)) → NAT_IN(X)
U91(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U101(Amount, C, Coins, N, ways_in(Amount, Coins, N))
U91(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins, N)
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U51(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → PLUS_IN(s(C), NewAmount, Amount)
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins, N1)
U61(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U71(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U61(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins), N2)
U71(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U81(Amount, C, Coins, N, plus_in(N1, N2, N))
U71(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → PLUS_IN(N1, N2, N)
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
WAYS_IN(Amount, .(s(C), Coins), N) → U41(Amount, C, Coins, N, =_in(Amount, s(X)))
WAYS_IN(Amount, .(s(C), Coins), N) → =_IN(Amount, s(X))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U91(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → PLUS_IN(Amount, s(X1), s(C))
PLUS_IN(s(X), Y, s(Z)) → U31(X, Y, Z, plus_in(X, Y, Z))
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
PLUS_IN(0, X, X) → U21(X, nat_in(X))
PLUS_IN(0, X, X) → NAT_IN(X)
NAT_IN(s(X)) → U11(X, nat_in(X))
NAT_IN(s(X)) → NAT_IN(X)
U91(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U101(Amount, C, Coins, N, ways_in(Amount, Coins, N))
U91(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins, N)
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U51(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → PLUS_IN(s(C), NewAmount, Amount)
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins, N1)
U61(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U71(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U61(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins), N2)
U71(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U81(Amount, C, Coins, N, plus_in(N1, N2, N))
U71(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → PLUS_IN(N1, N2, N)
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
NAT_IN(s(X)) → NAT_IN(X)
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
NAT_IN(s(X)) → NAT_IN(X)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
NAT_IN → NAT_IN
NAT_IN → NAT_IN
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
PLUS_IN(s(X)) → PLUS_IN(X)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
U91(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins, N)
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U91(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
WAYS_IN(Amount, .(s(C), Coins), N) → U41(Amount, C, Coins, N, =_in(Amount, s(X)))
U51(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins, N1)
U41(Amount, C, Coins, N, =_out(Amount, s(X))) → U51(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U61(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins), N2)
ways_in(Amount, .(s(C), Coins), N) → U4(Amount, C, Coins, N, =_in(Amount, s(X)))
=_in(X, X) → =_out(X, X)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U9(Amount, C, Coins, N, X, plus_in(Amount, s(X1), s(C)))
plus_in(s(X), Y, s(Z)) → U3(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → U2(X, nat_in(X))
nat_in(s(X)) → U1(X, nat_in(X))
nat_in(0) → nat_out(0)
U1(X, nat_out(X)) → nat_out(s(X))
U2(X, nat_out(X)) → plus_out(0, X, X)
U3(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, N, X, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, N, ways_in(Amount, Coins, N))
ways_in(X, [], 0) → ways_out(X, [], 0)
ways_in(0, X, s(0)) → ways_out(0, X, s(0))
U10(Amount, C, Coins, N, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, N, =_out(Amount, s(X))) → U5(Amount, C, Coins, N, X, plus_in(s(C), NewAmount, Amount))
U5(Amount, C, Coins, N, X, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, N, X, NewAmount, ways_in(Amount, Coins, N1))
U6(Amount, C, Coins, N, X, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N, X, NewAmount, N1, ways_in(NewAmount, .(s(C), Coins), N2))
U7(Amount, C, Coins, N, X, NewAmount, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, N, plus_in(N1, N2, N))
U8(Amount, C, Coins, N, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_in(Amount))
U41(Amount, C, Coins, =_out(Amount, s(X))) → U91(Amount, C, Coins, plus_in(Amount))
U41(Amount, C, Coins, =_out(Amount, s(X))) → U51(Amount, C, Coins, plus_in(s(C)))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins)
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Instantiation
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
U41(Amount, C, Coins, =_out(Amount, s(X))) → U91(Amount, C, Coins, plus_in(Amount))
U41(Amount, C, Coins, =_out(Amount, s(X))) → U51(Amount, C, Coins, plus_in(s(C)))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins)
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U91(s(x3), z1, z2, plus_in(s(x3)))
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U91(s(x3), z1, z2, plus_in(s(x3)))
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U41(Amount, C, Coins, =_out(Amount, s(X))) → U51(Amount, C, Coins, plus_in(s(C)))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins)
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U51(s(x3), z1, z2, plus_in(s(z1)))
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ QDPOrderProof
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U91(s(x3), z1, z2, plus_in(s(x3)))
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U51(s(x3), z1, z2, plus_in(s(z1)))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins)
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U91(s(x3), z1, z2, plus_in(s(x3)))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → WAYS_IN(Amount, Coins)
Used ordering: Polynomial interpretation [25]:
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U51(s(x3), z1, z2, plus_in(s(z1)))
POL(.(x1, x2)) = 1 + x2
POL(0) = 0
POL(=_in(x1)) = 0
POL(=_out(x1, x2)) = 0
POL(U1(x1)) = 0
POL(U10(x1, x2, x3, x4)) = 0
POL(U2(x1)) = 0
POL(U3(x1, x2)) = 0
POL(U4(x1, x2, x3, x4)) = 0
POL(U41(x1, x2, x3, x4)) = 1 + x3
POL(U5(x1, x2, x3, x4)) = 0
POL(U51(x1, x2, x3, x4)) = 1 + x1 + x3
POL(U6(x1, x2, x3, x4, x5)) = 0
POL(U61(x1, x2, x3, x4, x5)) = 1 + x3
POL(U7(x1, x2, x3, x4, x5)) = 0
POL(U8(x1, x2, x3, x4)) = 0
POL(U9(x1, x2, x3, x4)) = 0
POL(U91(x1, x2, x3, x4)) = x3
POL(WAYS_IN(x1, x2)) = x2
POL([]) = 0
POL(nat_in) = 0
POL(nat_out(x1)) = 0
POL(plus_in(x1)) = 0
POL(plus_out(x1, x2, x3)) = 0
POL(s(x1)) = 0
POL(ways_in(x1, x2)) = 0
POL(ways_out(x1, x2, x3)) = 0
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
U91(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → WAYS_IN(Amount, Coins)
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U51(s(x3), z1, z2, plus_in(s(z1)))
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)
↳ Prolog
↳ PredefinedPredicateTransformerProof
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
WAYS_IN(Amount, .(s(C), Coins)) → U41(Amount, C, Coins, =_out(Amount, Amount))
U61(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → WAYS_IN(NewAmount, .(s(C), Coins))
U51(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U61(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U41(s(x3), z1, z2, =_out(s(x3), s(x3))) → U51(s(x3), z1, z2, plus_in(s(z1)))
ways_in(Amount, .(s(C), Coins)) → U4(Amount, C, Coins, =_in(Amount))
=_in(X) → =_out(X, X)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U9(Amount, C, Coins, plus_in(Amount))
plus_in(s(X)) → U3(X, plus_in(X))
plus_in(0) → U2(nat_in)
nat_in → U1(nat_in)
nat_in → nat_out(0)
U1(nat_out(X)) → nat_out(s(X))
U2(nat_out(X)) → plus_out(0, X, X)
U3(X, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U9(Amount, C, Coins, plus_out(Amount, s(X1), s(C))) → U10(Amount, C, Coins, ways_in(Amount, Coins))
ways_in(X, []) → ways_out(X, [], 0)
ways_in(0, X) → ways_out(0, X, s(0))
U10(Amount, C, Coins, ways_out(Amount, Coins, N)) → ways_out(Amount, .(s(C), Coins), N)
U4(Amount, C, Coins, =_out(Amount, s(X))) → U5(Amount, C, Coins, plus_in(s(C)))
U5(Amount, C, Coins, plus_out(s(C), NewAmount, Amount)) → U6(Amount, C, Coins, NewAmount, ways_in(Amount, Coins))
U6(Amount, C, Coins, NewAmount, ways_out(Amount, Coins, N1)) → U7(Amount, C, Coins, N1, ways_in(NewAmount, .(s(C), Coins)))
U7(Amount, C, Coins, N1, ways_out(NewAmount, .(s(C), Coins), N2)) → U8(Amount, C, Coins, plus_in(N1))
U8(Amount, C, Coins, plus_out(N1, N2, N)) → ways_out(Amount, .(s(C), Coins), N)
ways_in(x0, x1)
=_in(x0)
U4(x0, x1, x2, x3)
plus_in(x0)
nat_in
U1(x0)
U2(x0)
U3(x0, x1)
U9(x0, x1, x2, x3)
U10(x0, x1, x2, x3)
U5(x0, x1, x2, x3)
U6(x0, x1, x2, x3, x4)
U7(x0, x1, x2, x3, x4)
U8(x0, x1, x2, x3)